package com.ruoyi.cscec.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cscec.mapper.DataMonitorMapper;
import com.ruoyi.cscec.domain.DataMonitor;
import com.ruoyi.cscec.service.IDataMonitorService;

/**
 * 数据监测Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-27
 */
@Service
public class DataMonitorServiceImpl implements IDataMonitorService
{
    @Autowired
    private DataMonitorMapper dataMonitorMapper;

    /**
     * 查询数据监测
     *
     * @param dmId 数据监测主键
     * @return 数据监测
     */
    @Override
    public DataMonitor selectDataMonitorByDmId(Long dmId)
    {
        return dataMonitorMapper.selectDataMonitorByDmId(dmId);
    }

    /**
     * 查询数据监测列表
     *
     * @param dataMonitor 数据监测
     * @return 数据监测
     */
    @Override
    public List<DataMonitor> selectDataMonitorList(DataMonitor dataMonitor)
    {
        return dataMonitorMapper.selectDataMonitorList(dataMonitor);
    }

    /**
     * 新增数据监测
     *
     * @param dataMonitor 数据监测
     * @return 结果
     */
    @Override
    public int insertDataMonitor(DataMonitor dataMonitor)
    {
        return dataMonitorMapper.insertDataMonitor(dataMonitor);
    }

    /**
     * 修改数据监测
     *
     * @param dataMonitor 数据监测
     * @return 结果
     */
    @Override
    public int updateDataMonitor(DataMonitor dataMonitor)
    {
        return dataMonitorMapper.updateDataMonitor(dataMonitor);
    }

    /**
     * 批量删除数据监测
     *
     * @param dmIds 需要删除的数据监测主键
     * @return 结果
     */
    @Override
    public int deleteDataMonitorByDmIds(Long[] dmIds)
    {
        return dataMonitorMapper.deleteDataMonitorByDmIds(dmIds);
    }

    /**
     * 删除数据监测信息
     *
     * @param dmId 数据监测主键
     * @return 结果
     */
    @Override
    public int deleteDataMonitorByDmId(Long dmId)
    {
        return dataMonitorMapper.deleteDataMonitorByDmId(dmId);
    }
}
